package com.api.shopapi.config;

import com.alipay.api.AlipayClient;
import com.alipay.api.DefaultAlipayClient;

public class AlipayConfig {

    // 1.商户appid,使用商户自己的appid即可
    public static String APPID = "2021001189618493";
    //public static String APPID = "2021001101631816";
//    public static String APPID = "2021000120612802";//沙箱

    //2.App私钥
    public static String APP_PRIVATE_KEY = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCuWf8/A3cxOg7Y3OIgZS9gqqnwce7F+1WrwJSPyQhqBab7796cqoEIX19EQTGrydsaltnoWjfeHjP6NGhvYLIAPzhaYPTXTcCUK/deRWq8u9jdGeiv7+P3kCLloueKsTDOvaiyiIDf3vt6XMIB4Fq+apeq3aenM7lwx/ZYC3ZAerMXOMt161aKn4guxqgeAWo9DRLnt6B1EMcW2U54zUuqdiggNp5nMDY1Z583P0/sbUSgBXt4Jl1ErNDgNFx0sVK9pAUOzIcut0S/c3RLDI9MJuI3CuY80+cLa2iItQTJvuCag3io1WMIynhkk8jM0X8v4wOlyikQDPa9PA94Vq3nAgMBAAECggEAMfIKEq0Vef6dvjYYeRtDZTe+kuiwc/q54ge7By2ZwXV5Dnb6mHqnmBRqIA1lA0dCAu3v4oXltzWDwks9F5rlovh5VjqsKPlXD5tAs7rDBunxB/WiGLRp48Ngm9P87FgyGSdvqiU8deVUuQrVcOAqXp3+cK4qltVUbCB8S2CNMY77igz3HZ1fKX0DHfdnEysXDd/s8Bh+mB3dk0FXf8uu6FrrzPD2mavP8o7Zhrj0G4nVbln/Hh4D2v/TA+1YuRozheEqUhuIxLEF0Rn+VAksq9wVb8496ENYqrjNMAQ5sDrsO4X1O9cnYHbPDM+5QnoYZbPpbJbFR7fEKqgD7HkNoQKBgQDd9GfHIXvsyDCZJkyZYgsaUV+rmNL4FeLoYiIwPNrh2NTOV3Khq56aTVKZkqKF1TXPhPlTjKuW2B9UpC6n3eHvvX6YMR+6NqAaMdLjYIH/RwRo1cTf+ahgyrH5u2YHcAKoNqQOstKXfLRm1G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WLh5c3YxbWnfzfiqyK3MPT9PTY5bA8p+YB7kG2vfvbPoBx+f5p9GuE1AP0TfxMjVLixtNoLwqQGqnDrkQIDAQAB";
    // 4.服务器异步通知页面路径 需http://或者https://格式的完整路径，必须外网可以正常访问，可以使用natapp进行外网映射
    public static String notify_url = "http://shopapi.ltylao.com:9987/PayNotify/AliPayNotify";

    //5.页面跳转同步通知页面路径 需http://或者https://格式的完整路径，必须外网可以正常访问 商户可以自定义同步跳转地址
    public static String return_url = "";

    // 6.请求支付宝的网关地址,此处为沙箱测试地址，正式环境替换即可
    public static String URL = "https://openapi.alipay.com/gateway.do";
//    public static String URL = "https://openapi.alipaydev.com/gateway.do";//沙箱

    // 7.编码
    public static String CHARSET = "utf-8";

    // 8.返回格式
    public static String FORMAT = "json";

    // 9.加密类型
    public static String SIGNTYPE = "RSA2";

    //10.商品标题
    public static  String subject="";

    //11对一笔交易的具体描述信息。如果是多种商品，请将商品描述字符串累加传给body
    public static String body = "";


    public static AlipayClient initClient() {
        AlipayClient alipayClient = new DefaultAlipayClient(URL, APPID, APP_PRIVATE_KEY, FORMAT, CHARSET,ALIPAY_PUBLIC_KEY,SIGNTYPE);
        return alipayClient;
    }



}
